

const { ccclass, property } = cc._decorator;

@ccclass
export default class Tween_breathe extends cc.Component {
    public TweenId: cc.Tween;
    start() {
        this.TweenId = cc.tween(this.node)
            .to(1.25, { scale: 1.04 })
            .to(1.25, { scale: 1 })
            .union()
            .repeatForever()
            .start();
    }
    resetTween(initscale: number) {
        this.TweenId = cc.tween(this.node)
            .to(1.25, { scale: initscale * 1.04 })
            .to(1.25, { scale: initscale })
            .union()
            .repeatForever()
            .start();
    }

    turnRightTween(initscale: number) {
        this.TweenId = cc.tween(this.node)
            .to(1.25, { scaleX: -initscale * 1.04, scaleY: initscale * 1.04 })
            .to(1.25, { scaleX: -initscale, scaleY: initscale })
            .union()
            .repeatForever()
            .start();
    }
}
